package com.lk.service.Impl;

import com.lk.bean.Student;
import com.lk.bean.Teacher;
import com.lk.mapper.TeacherMapper;
import com.lk.request.LoginRequest;
import com.lk.service.TeacherService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TeacherServiceImpl implements TeacherService {

    @Resource
    private TeacherMapper teacherMapper;
    @Override
    public Teacher login(LoginRequest loginRequest) {
        return teacherMapper.login(loginRequest);
    }

    @Override
    public int updatePassWord(Integer id,String Password) {
        return teacherMapper.updatePassWord(id,Password);
    }

    @Override
    public int delete(Integer[] ids) {
        return teacherMapper.delete(ids);
    }

    @Override
    public Teacher findByName(String name) {
        return teacherMapper.findByName(name);
    }

    @Override
    public int addTeacher(Teacher teacher) {
        return teacherMapper.addTeacher(teacher);
    }

    @Override
    public int updateTeacher(Teacher teacher) {
        return teacherMapper.updateTeacher(teacher);
    }

    @Override
    public List<Teacher> getTeacherList(Teacher teacher) {
        return teacherMapper.getTeacherList(teacher);
    }
}
